1. Field of the Invention
The invention relates to image processing and, more particularly, to bad pixel detection and correction within digital image processing that preserves features within the image.
2. Related Art
Conventional bad pixel detection and correction systems often employ multi-stage median filtering. The multi-stage median filtering is performed as shown below. For the 3×3 pixel array:
a0, a1, a2
a3, A, a4
a5, a6, a7
where a0, a1, a2, a3, a4, a5, a6, and a7 are the neighboring pixels, the multi-stage median filtering process is performed as follows:
H=median (a3, A, a4)
V=median (a1, A, a6)
O=median (H, A, V)
SE=median (a0, A, a7)
NE=median (a5, A, a2)
D=median (SE, A, NE)
A′=median (O, A, D)
One of the deficiencies of this conventional method of bad pixel correction is that three operations are needed to determine each median, and a total of twenty-one operations are performed for each pixel. The multi-stage median filtering process also must be performed on every pixel, instead of just those that are actually bad. Another conventional method for correcting bad pixels is normal median filtering, but this method must also be performed on every pixel, and can undesirably smooth detail features on the image.